package com.internship.service;


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.internship.dao.JobStudentDao;
import com.internship.model.Distribution;
import com.internship.model.JobStudent;
import com.internship.page.Page;

@Service
public class JobStudentService {
	private final int PAGE_SIZE = 10;
	private final int PAGE = 7;
	@Autowired
	private JobStudentDao jobStudentDao;
	public JobStudent getJobStudent(String XH) {
		return jobStudentDao.getJobStudent(XH);
	}
	public Page<JobStudent> getJobStudentList(String XM,String XY,String ZYDM,String XZB,String SchoolTeacher,int DQSZJ,int pageNumber) {
		Page<JobStudent> page = new Page<JobStudent>(pageNumber, PAGE_SIZE);
		List<JobStudent> list = jobStudentDao.getJobStudentList(XM, XY, ZYDM, XZB, SchoolTeacher,DQSZJ, page);
		page.setResultList(list);
		return page;
	}
	public Page<JobStudent> getPracticeSummaryList(String XM,String XY,String ZYDM,String XZB,int DQSZJ,int pageNumber) {
		Page<JobStudent> page = new Page<JobStudent>(pageNumber, PAGE_SIZE);
		List<JobStudent> list = jobStudentDao.getPracticeSummaryList(XM, XY, ZYDM, XZB, DQSZJ, page);
		page.setResultList(list);
		return page;
	}
	public Page<JobStudent> getGuideStudentsList(String SchoolTeacher,int pageNumber) {
		Page<JobStudent> page = new Page<JobStudent>(pageNumber, PAGE);
		List<JobStudent> list = jobStudentDao.getGuideStudentsList(SchoolTeacher, page);
		page.setResultList(list);
		return page;
	}
	public List<JobStudent> getJobStudentList() {
		List<JobStudent> list = jobStudentDao.getJobStudentList();
		return list;
	}
	public int addJobStudent(JobStudent jobStudent) {
		return jobStudentDao.addJobStudent(jobStudent);
	}
	public int updateJobStudent(JobStudent jobStudent) {
		return jobStudentDao.updateJobStudent(jobStudent);
	}
	public int schoolAssignment(String XY,String ZYDM,String XZB,int DQSZJ) {
		return jobStudentDao.schoolAssignment(XY, ZYDM, XZB, DQSZJ);
	}
	public int selfSeeking(String XY,String ZYDM,String XZB,int DQSZJ) {
		return jobStudentDao.selfSeeking(XY, ZYDM, XZB, DQSZJ);
	}
	
	public int entrepreneurship(String XY,String ZYDM,String XZB,int DQSZJ) {
		return jobStudentDao.entrepreneurship(XY, ZYDM, XZB, DQSZJ);
	}
	
	public int theSchool(String XY,String ZYDM,String XZB,int DQSZJ) {
		return jobStudentDao.theSchool(XY, ZYDM, XZB, DQSZJ);
	}
	public int upgradedBook(String XY,String ZYDM,String XZB,int DQSZJ) {
		return jobStudentDao.upgradedBook(XY, ZYDM, XZB, DQSZJ);
	}
	public int hefeiCount(String XY,String ZYDM,String XZB,int DQSZJ) {
		return jobStudentDao.hefeiCount(XY, ZYDM, XZB, DQSZJ);
	}
	public int wuhuCount(String XY,String ZYDM,String XZB,int DQSZJ) {
		return jobStudentDao.wuhuCount(XY, ZYDM, XZB, DQSZJ);
	}
	public int nanjingCount(String XY,String ZYDM,String XZB,int DQSZJ) {
		return jobStudentDao.nanjingCount(XY, ZYDM, XZB, DQSZJ);
	}
	public List<Distribution> getDistributionList() {
		List<Distribution> list = jobStudentDao.getDistributionList();
		return list;
	}
}
